<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增车型')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-vehicle_model-add">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">型号：</label>
                    <div class="col-sm-8">
                        <input name="model" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">公告批次：</label>
                    <div class="col-sm-8">
                        <input name="announcementBatch" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">企业名称：</label>
                    <div class="col-sm-8">
                        <select name="enterpriseName" class="form-control" th:with="type=${@dict.getType('ent_name')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">车辆名称：</label>
                    <div class="col-sm-8">
                        <select name="vehicleType" class="form-control" th:with="type=${@dict.getType('vehicle_name_dic')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">品牌：</label>
                    <div class="col-sm-8">
                        <select name="brand" class="form-control" th:with="type=${@dict.getType('vehicle_brand_name_dic')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">公告号：</label>
                    <div class="col-sm-8">
                        <input name="announcementNumber" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">最高车速 km/h：</label>
                    <div class="col-sm-8">
                        <input name="maximumSpeed" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">尺寸-长 mm：</label>
                    <div class="col-sm-8">
                        <input name="dimensionLength" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">尺寸-宽 mm：</label>
                    <div class="col-sm-8">
                        <input name="dimensionWidth" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">尺寸-高 mm：</label>
                    <div class="col-sm-8">
                        <input name="dimensionHeight" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">轴距 mm：</label>
                    <div class="col-sm-8">
                        <input name="wheelbase" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">总质量 Kg：</label>
                    <div class="col-sm-8">
                        <input name="totalMass" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">整备质量 Kg：</label>
                    <div class="col-sm-8">
                        <input name="curbWeight" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">纯电动模式下续驶里程 km：</label>
                    <div class="col-sm-8">
                        <input name="pureElectricRange" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">原车电池型号：</label>
                    <div class="col-sm-8">
                        <input name="originalBatteryModel" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">使用动力电池型号：</label>
                    <div class="col-sm-8">
                        <input name="usedPowerBatteryModel" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">使用动力电机型号：</label>
                    <div class="col-sm-8">
                        <input name="usedDriveMotorModel" class="form-control" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/vehicle_model"
        $("#form-vehicle_model-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-vehicle_model-add').serialize());
            }
        }
    </script>
</body>
</html>